var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    count1:'0',
    count2:'0'
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    wx.getStorage({
      key: 'openid',
      success: function(res) {
        let openid = res.data

        wx.request({
          url: app.globalData.URL + '/app/myOrder/cardIndex?openid='+openid,
          success: function (res) {
            console.log(res)
            that.setData({
              count1: res.data.fxOrderList.length || '0',
              count2: res.data.orderList.length || '0',
            })
          }
        })
      },
    })
    
  },

  

  toWelfareOrder: function () {
    wx.navigateTo({
      url: '../welfareOrder/welfareOrder',
      success: function (res) { },
      fail: function (res) { },
      complete: function (res) { },
    })
  },

  toMemberOrder:function(){
    wx.navigateTo({
      url: '../memberOrder/memberOrder',
      success: function(res) {},
      fail: function(res) {},
      complete: function(res) {},
    })
  }
})